package xyz.ddlnt.servicegeneral.controller;

import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xyz.ddlnt.commonutil.result.Result;
import xyz.ddlnt.model.dto.CategoryDTO;
import xyz.ddlnt.servicemgclient.client.CategoryFeignClient;

import java.util.List;

/**
 * @author ZZULI_SE 210910
 * @data 2025/5/11 0:48
 */
@Slf4j
@RestController
@RequestMapping("/category")
public class CategoryToMgController {
    @Resource
    private CategoryFeignClient categoryFeignClient;

    /**
     * 调用管理端feign接口
     * @return
     */
    @GetMapping("getAllName")
    Result<List<CategoryDTO>> getAllCategoryName() {
        return categoryFeignClient.getAllCategoryName();
    }

}
